/**
 * 
 */
package nl.wowww.top2000.service.ws;

import nl.wowww.top2000.model.Artist;
import nl.wowww.top2000.model.ws.ArtistRequest;
import nl.wowww.top2000.service.MusicService;

import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;

/**
 * @author http://www.linkedin.com/in/marcdekwant
 * @company wowww.nl
 *
 */
@Endpoint
public class ArtistEndPoint {
    
    private MusicService musicService;

    /**
     * @param musicService the musicService to set
     */
    public final void setMusicService(MusicService musicService) {
        this.musicService = musicService;
    }

    //Payload is without WS-Adressing
    @PayloadRoot(localPart = "ArtistRequest", namespace = "http://www.wowww.nl/top2000/artist/schemas")
    //Action is part of the WS-Adressing implementation
    //@Action("http://www.wowww.nl/top2000/artist/schemas/ArtistRequest")
    public Artist getArtist(Object requestObject) {
        ArtistRequest request = (ArtistRequest)requestObject;
        Artist a = new Artist();
        a.setAge("25");
        return a;
    }

}
